import Vue from 'vue'
import App from './App.vue'
import store from './store/index'
import router from './router'
import less from 'less' 
import confirmMy from './assets/confirmMy'
import axios from 'axios'
import 'swiper/dist/css/swiper.min.css'
import 'swiper/dist/js/swiper.min'

// import Services from '../utils/Service'

Vue.config.productionTip = false
Vue.prototype.$confirmMy = confirmMy;
// Vue.prototype.$Services = Services

Vue.use(less)

Vue.prototype.$http= axios
//弹出框禁止滑动
Vue.prototype.stopScroll = function () {
  var mo = function (e) { e.preventDefault() }
  document.body.style.overflow = 'hidden'
  document.addEventListener('touchmove', mo, false)// 禁止页面滑动
}
 
//弹出框可以滑动
Vue.prototype.canScroll = function () {
  var mo = function (e) {
    e.preventDefault()
  }
  document.body.style.overflow = ''// 出现滚动条
  document.removeEventListener('touchmove', mo, false)
}

new Vue({
  router,
  store,
  render: h => h(App),
  beforeCreate() {
		Vue.prototype.$bus = this  // 安装全局事件总线,$bus就是当前应用的vm
	},
}).$mount('#app')
